package com.baox.agridata.synchronous.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baox.agridata.synchronous.entity.TXDRFarmEntity;
import com.baox.agridata.synchronous.entity.TXDRHatcheryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TXDRFarmMapper {


    /**
     * 通过主键查询养殖场户是否存在
     *
     * @param mid
     * @return
     */
    @DS("sichuanc")
    TXDRFarmEntity selectTXDRFarmById(@Param("mid") String mid);


    /**
     * 插入养殖场数据
     *
     * @param txdrFarmEntity
     * @return
     */
    @DS("sichuanz")
    Integer insertIntoTXDRFarm(TXDRFarmEntity txdrFarmEntity);


    /**
     * 更新养殖户信息
     *
     * @param txdrFarmEntity
     * @return
     */
    @DS("sichuanz")
    Integer updateTXDRCarById(TXDRFarmEntity txdrFarmEntity);


    /**
     * 同步四川的养殖场户到成都系统
     *
     * @return
     */
    @DS("sichuanc")
    List<TXDRFarmEntity> selectTXDRFarmDataToChengDu(@Param("startTime") String startTime);



    @DS("sichuanc")
    List<TXDRFarmEntity> selectSichuanData();


    @DS("sichuanz")
    Integer deleteFarmList(@Param("list") List<TXDRFarmEntity> list);


}
